C     PROGRAM TO DEMONSTRATE THE OPERATION OF HEADER.ASM & COMLIN.ASM
C     JOHN W. ROSS  1986

      INTEGER COMLIN
      CHARACTER COMARG*127, FILNAM*64, TEXT*70
      IF (COMLIN(COMARG).EQ.0) THEN
        WRITE (*,'(1X,A\)') 'Input file name ... '
        READ (*,'(A)') FILNAM
      ELSE
        FILNAM=COMARG(2:)
      ENDIF
      OPEN (1,FILE=FILNAM,STATUS='OLD')
1     READ (1,'(A)') TEXT
      WRITE (*,*) 'FIRST LINE: ',TEXT
      CLOSE (1)
      END
